[gd_scene load_steps=17 format=3 uid="uid://dwufsrfb2nb2n"]

[ext_resource type="Texture2D" uid="uid://crdr1r3gdxcaa" path="res://assets/background.png" id="1_0w7c8"]
[ext_resource type="Theme" uid="uid://htiph5vt1b65" path="res://assets/theme.tres" id="1_fpe2o"]
[ext_resource type="Script" path="res://scripts/main.gd" id="1_im3s4"]
[ext_resource type="Script" path="res://scripts/background.gd" id="2_dvs30"]
[ext_resource type="Script" path="res://scripts/player.gd" id="3_c3as0"]
[ext_resource type="Texture2D" uid="uid://bxm45jk7k7v0t" path="res://assets/cheep_cheep.png" id="4_5wnm6"]
[ext_resource type="Script" path="res://scripts/foreground.gd" id="5_2ydct"]
[ext_resource type="Texture2D" uid="uid://bq8l7whcyrxki" path="res://assets/foreground.png" id="6_s40v3"]
[ext_resource type="PackedScene" uid="uid://cjhnwyawaq2gb" path="res://scenes/pipe.tscn" id="7_tlj6u"]
[ext_resource type="Script" path="res://scripts/instruction.gd" id="10_t1pcn"]

[sub_resource type="RectangleShape2D" id="RectangleShape2D_malyy"]
size = Vector2(56, 56)

[sub_resource type="Animation" id="Animation_vbqcw"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("CheepCheep:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [0]
}

[sub_resource type="Animation" id="Animation_6aqaj"]
resource_name = "flappying"
length = 0.2
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("CheepCheep:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.1),
"transitions": PackedFloat32Array(1, 1),
"update": 1,
"values": [0, 1]
}

[sub_resource type="AnimationLibrary" id="AnimationLibrary_kappv"]
_data = {
"RESET": SubResource("Animation_vbqcw"),
"flappying": SubResource("Animation_6aqaj")
}

[sub_resource type="RectangleShape2D" id="RectangleShape2D_33xgh"]
size = Vector2(60, 60)

[sub_resource type="RectangleShape2D" id="RectangleShape2D_vjc1t"]
size = Vector2(56, 112)

[node name="main" type="Control"]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme = ExtResource("1_fpe2o")
script = ExtResource("1_im3s4")

[node name="background_0" type="Sprite2D" parent="."]
texture_repeat = 2
texture = ExtResource("1_0w7c8")
centered = false
region_enabled = true
region_rect = Rect2(0, 0, 3328, 720)
script = ExtResource("2_dvs30")

[node name="pipe" parent="." instance=ExtResource("7_tlj6u")]
position = Vector2(1344, 440)

[node name="pipe2" parent="." instance=ExtResource("7_tlj6u")]
position = Vector2(1984, 360)

[node name="player" type="Area2D" parent="."]
position = Vector2(420, 686)
script = ExtResource("3_c3as0")
metadata/_edit_group_ = true

[node name="CollisionShape2D" type="CollisionShape2D" parent="player"]
shape = SubResource("RectangleShape2D_malyy")

[node name="CheepCheep" type="Sprite2D" parent="player"]
texture_filter = 1
texture = ExtResource("4_5wnm6")
hframes = 2

[node name="Timer" type="Timer" parent="player"]

[node name="AnimationPlayer" type="AnimationPlayer" parent="player"]
libraries = {
"": SubResource("AnimationLibrary_kappv")
}

[node name="foreground" type="Sprite2D" parent="."]
texture_repeat = 2
position = Vector2(0, 608)
texture = ExtResource("6_s40v3")
centered = false
region_enabled = true
region_rect = Rect2(0, 0, 1408, 112)
script = ExtResource("5_2ydct")

[node name="output" type="Label" parent="."]
layout_mode = 1
anchors_preset = 5
anchor_left = 0.5
anchor_right = 0.5
offset_left = -640.0
offset_right = 640.0
offset_bottom = 96.0
grow_horizontal = 2
text = "0"
horizontal_alignment = 1
vertical_alignment = 2

[node name="death_label" type="Label" parent="."]
visible = false
layout_mode = 1
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -404.5
offset_top = -36.0
offset_right = 404.5
offset_bottom = 36.0
grow_horizontal = 2
grow_vertical = 2
theme_override_font_sizes/font_size = 46
text = "press space to retry..."

[node name="Timer" type="Timer" parent="."]

[node name="top_boundry" type="Area2D" parent="."]
position = Vector2(420, -32)
metadata/_edit_group_ = true

[node name="CollisionShape2D" type="CollisionShape2D" parent="top_boundry"]
position = Vector2(-2, 2)
shape = SubResource("RectangleShape2D_33xgh")

[node name="bottom_boundry" type="Area2D" parent="."]

[node name="CollisionShape2D" type="CollisionShape2D" parent="bottom_boundry"]
position = Vector2(420, 664)
shape = SubResource("RectangleShape2D_vjc1t")
disabled = true

[node name="instruction" type="Label" parent="."]
layout_mode = 1
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -86.0
offset_top = -191.0
offset_right = 87.0
offset_bottom = -168.0
grow_horizontal = 2
grow_vertical = 2
theme_override_font_sizes/font_size = 16
text = "press space ..."
script = ExtResource("10_t1pcn")
